package com.css.zfzx.sjcj.modules.hddcB1TrenchBelongSamplePrj.repository;

import com.css.zfzx.sjcj.modules.hddcB1TrenchBelongSamplePrj.repository.entity.HddcB1TrenchbelongsampleprjEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-30
 */
public interface HddcB1TrenchbelongsampleprjRepository extends JpaRepository<HddcB1TrenchbelongsampleprjEntity, String> {
    @Query(nativeQuery = true, value = "select * from hddc_b1_trenchbelongsampleprj where is_valid =1 and project_name in :projectIds")
    List<HddcB1TrenchbelongsampleprjEntity> queryByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_b1_trenchbelongsampleprj where is_valid =1 and task_name in :taskIds")
    List<HddcB1TrenchbelongsampleprjEntity> queryByTaskId(List<String> taskIds);
}
